﻿IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tb_user_permit]') AND TYPE in (N'U'))
BEGIN
CREATE TABLE tb_user_permit
(
    Id INT IDENTITY(1,1) NOT NULL,
	UserName varchar(20) not null default(''),
	RoleCode varchar(100) not null default(''),
	ProjectCode varchar(100) not null default(''),
	PermitGroupCode varchar(100) not null default(''),
	PermitCode varchar(4000) not null default(''),
    CreateBy VARCHAR(100),
    CreateDate DATETIME DEFAULT(GETDATE()),
    UpdateBy VARCHAR(100),
    UpdateDate DATETIME,
	CONSTRAINT PK_user_permit_Id PRIMARY KEY CLUSTERED (Id)
) 
END
GO